
#include "dominion.h"
#include "dominion_helpers.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

void testCard(int card, int choice1, int choice2, int choice3, struct gameState * state, int handPos, int *bonus);

int main(int argc, char *argv[])
{
	int card = 18; // steward
	int choice1 = 1;
	int choice2 = 0;
	int choice3 = 0;
	struct gameState * g;
	int handPos = 1;
	int * bonus; 

	g = newGame();
	int * kc = kingdomCards(3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
	initializeGame(2, kc, 23, g);
	
	
	printf("Testing card number:  %i...\n ", card);
	testCard(card, choice1, choice2, choice3, g, handPos, bonus);

    return 0;
}

void testCard(int card, int choice1, int choice2, int choice3, struct gameState * state, int handPos, int *bonus){

	int dc = state->deckCount[0];
	int c = state->coins;
	cardEffect(card, choice1, choice2, choice3, state, handPos, bonus);
	int dc2 = state->deckCount[0];
	int c2 = state->coins;
	if(dc <= dc2){
		printf("Fail: draw count not decremented\n");
	}
	else if(dc - dc2 != 2){
		printf("Fail: draw card not decremented by correct ammount.\n");
	}
	if(c <= c2){
		printf("Fail: coins not incremented\n");
	}
	else if(c2 - c){
		printf("Faile: coins not incremented by correct ammount.\n");
	}
}
